package nic.controller;

import java.io.File;

public class Utils {
	public static String getExtension(File f) {
        return getExtension(f.getName());
    }
	
	public static String getExtension(String filename) {
		String ext = null;
        int i = filename.lastIndexOf('.');

        if (i > 0 &&  i < filename.length() - 1) {
            ext = filename.substring(i+1).toLowerCase();
        }
        return ext;
    }
}
